package com.tengju.bff.interfaces.covercharge.service;

import com.tengju.bff.interfaces.covercharge.constant.CoverChargeEnum;
import com.tengju.bff.interfaces.covercharge.entity.model.SmsVerification;
import com.tengju.bff.interfaces.covercharge.entity.po.ServiceSelfCertification;
import com.tengju.bff.interfaces.covercharge.entity.vo.*;
import com.tengju.settlement.domain.model.depository.DepositoryAccount;

/**
 * <p>
 * 自认证service
 * </p>
 *
 * @author zhaoyi
 * @since 2020-02-24
 */
public interface SelfCertificationService {

    /**
     * 自认证提现申请
     *
     * @param accountType            账户类型
     * @param idCode                 idCode
     * @param withdrawalCompanyApply 自认证申请信息
     */
    Integer withdrawalApply(CoverChargeEnum.ServiceAccountType accountType, Integer idCode, WithdrawalCompanyApply withdrawalCompanyApply, DepositoryAccount depositoryAccount);

    /**
     * 自认证重新申请
     *
     * @param idCode                   idCode
     * @param withdrawalCompanyReApply 自认证重新申请信息
     */
    Integer withdrawalApplyUpdate(Integer idCode, WithdrawalCompanyReApply withdrawalCompanyReApply);

    /**
     * 自认证提现申请取消
     *
     * @param idCode       idCode
     * @param platformCode 平台编号
     */
    void withdrawalApplyCancel(Integer idCode, String platformCode, Integer applyId);


    /**
     * 自认证提现申请理由修改
     *
     * @param idCode 代理id
     * @param platformCode 平台编码
     * @param withdrawalApply withdrawalApply
     */
    Integer updateApplyReason(Integer idCode,String platformCode,WithdrawalApply withdrawalApply,String beforeIdentity);

    /**
     * 自认证注册
     * @param selfCertificationQuery
     */
    void registered(SelfCertificationQuery selfCertificationQuery);

    /**
     * 申请数字证书
     * @param selfCertificationQuery
     */
    void registeredApplyCert(SelfCertificationQuery selfCertificationQuery);

    /**
     * 自认证查询
     * @param selfCertificationQuery
     */
    ServiceSelfCertification registeredInfo(SelfCertificationQuery selfCertificationQuery);

    /**
     * 区域服务商判断需不需要升级
     * @param selfCertificationQuery
     */
    Integer registeredUpgrade(SelfCertificationQuery selfCertificationQuery);

    /**
     * 手机三要素获取验证码
     * @param smsVerification
     */
    String doIdentity3Auth(SmsVerification smsVerification, boolean needGeetest);


    /**
     * 个人手机号三要素校验
     * @param smsVerificationVerifyReq
     */
    void doIdentity3AuthVerify(SmsVerificationVerifyReq smsVerificationVerifyReq);

    /**
     * 通知会员认证成功
     * @param selfCertificationQuery
     */
    Boolean noticeStarService(SelfCertificationQuery selfCertificationQuery);
}
